﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("---------------欢 迎 进 入 游 戏 世 界---------------");
            Console.WriteLine("*****************************************************");
            Console.WriteLine("**********************猜拳，开始*********************");
            Console.WriteLine("*****************************************************");
            Console.WriteLine("出拳规则：1.剪刀 2.石头 3.布");
            Console.WriteLine("请选择对方角色<1:刘备 2:孙权 3:曹操>");
            int a = int.Parse(Console.ReadLine());
            switch (a)
            {
                case 1:
                    KLO();
                    Console.WriteLine("要开始下一局吗？<y/n>");
                    string XX = Console.ReadLine();
                    switch (XX)
                    {
                        case "y":
                            KLO();
                            break;
                        case "n":
                            Console.WriteLine("系统退出！！！");
                            break;
                    }
                    break;
                case 2:
                    DDE();
                    Console.WriteLine("要开始下一局吗？<y/n>");
                    string WW = Console.ReadLine();
                    switch (WW)
                    {
                        case "y":
                            DDE();
                            break;
                        case "n":
                            Console.WriteLine("系统退出！！！");
                            break;
                    }
                    break;
                case 3:
                    SSS();
                    Console.WriteLine("要开始下一局吗？<y/n>");
                    string RR = Console.ReadLine();
                    switch (RR)
                    {
                        case "y":
                            SSS();
                            break;
                        case "n":
                            Console.WriteLine("系统退出！！！");
                            break;
                    }
                    break;

            }
            Console.ReadKey();
        }
        static public void KLO() 
        {
            Player pla = new Player();
            Console.WriteLine("请输入您的名字：");
            string name = Console.ReadLine();
            pla.DN = Computer.刘备;
            pla.name = name;
            pla.LiuBei();
        }
        static public void DDE()
        {
            Player pla = new Player();
            Console.WriteLine("请输入您的名字：");
            string name = Console.ReadLine();
            pla.DN = Computer.孙权;
            pla.name = name;
            pla.SunQuan();
        }
        static public void SSS()
        {
            Player pla = new Player();
            Console.WriteLine("请输入您的名字：");
            string name = Console.ReadLine();
            pla.DN = Computer.曹操;
            pla.name = name;
            pla.CaoCao();
        }
    }
}
